module.exports = {
  configureWebpack: {
    // provide the app's title in webpack's name field, so that
    // it can be accessed in index.html to inject the correct title.
    devtool: 'source-map',
    resolve: { alias: { 'vue$': 'vue/dist/vue.esm.js' } }
  },
  devServer: {
    port: 9056,
    proxy: {
      '/api': {
        target: 'http://106.52.79.217:1801',//目标地址
        ws: false, //// 是否启用websockets
        changeOrigin: true, //开启代理：在本地会创建一个虚拟服务端，然后发送请求的数据，并同时接收请求的数据，这样服务端和服务端进行数据的交互就不会有跨域问题
        //pathRewrite: { '^/api': '/' }    //这里重写路径
      }

    }
  }
}